}
static gboolean
-copy_dir_recurse_fsync (int src_parent_dfd,
- int dest_parent_dfd,
- const char *name,
- GCancellable *cancellable,
- GError **error)
+copy_dir_recurse (int src_parent_dfd,
+ int dest_parent_dfd,
+ const char *name,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean ret = FALSE;
int src_dfd = -1;
if (S_ISDIR (child_stbuf.st_mode))
{
- if (!copy_dir_recurse_fsync (src_dfd, dest_dfd, name,
- cancellable, error))
+ if (!copy_dir_recurse (src_dfd, dest_dfd, name,
+ cancellable, error))
goto out;
}
else
{
if (!glnx_file_copy_at (src_dfd, name, &child_stbuf, dest_dfd, name,
- GLNX_FILE_COPY_OVERWRITE | GLNX_FILE_COPY_DATASYNC,
+ GLNX_FILE_COPY_OVERWRITE,
cancellable, error))
goto out;
}
}
- /* And finally, fsync the fd */
- if (fsync (dest_dfd) != 0)
- {
- gs_set_error_from_errno (error, errno);
- goto out;
- }
-
ret = TRUE;
out:
if (srcd)
if (S_ISDIR (modified_stbuf.st_mode))
{
- if (!copy_dir_recurse_fsync (modified_etc_fd, new_etc_fd, path,
- cancellable, error))
+ if (!copy_dir_recurse (modified_etc_fd, new_etc_fd, path,
+ cancellable, error))
goto out;
}
else if (S_ISLNK (modified_stbuf.st_mode) || S_ISREG (modified_stbuf.st_mode))
{
if (!glnx_file_copy_at (modified_etc_fd, path, &modified_stbuf,
new_etc_fd, path,
- GLNX_FILE_COPY_OVERWRITE | GLNX_FILE_COPY_DATASYNC,
+ GLNX_FILE_COPY_OVERWRITE,
cancellable, error))
goto out;
}
goto out;
}
- if (fsync (dest_parent_dfd) != 0)
- {
- gs_set_error_from_errno (error, errno);
- goto out;
- }
-
ret = TRUE;
out:
if (dest_parent_dfd != -1)